using System;
using System.Linq.Expressions;

namespace Charisma.MongoDb.Linq.Expressions
{
  internal sealed class AggregateExpression : MongoExpression
  {
    public AggregateKind Kind { get; private set; }
    public Expression Argument { get; private set; }
    public bool Distinct { get; private set; }

    public AggregateExpression(Type type, AggregateKind kind, Expression argument, bool distinct)
      : base(MongoExpressionType.Aggregate, type)
    {
      Kind = kind;
      Argument = argument;
      Distinct = distinct;
    }
  }
}